<template>
    <lottie-player v-if="conf.url" autoplay loop mode="normal" :src="conf.url"></lottie-player>
</template>

<script lang="ts" setup>
import { reactive } from 'vue'
const getParam = (url: any): boolean => {
    const regex = /[?&]([^=#]+)=([^&#]*)/g
    return url.match(regex)?.reduce((acc: any, cur: any) => {
        const [param, value] = cur.substring(1).split('=')
        acc[param] = decodeURIComponent(value)
        return acc
    }, {})
}
const obj: any = getParam(window.location.href)

const conf = reactive({
    url: obj?.url
})
</script>
<style lang="less" scoped></style>
